<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-JAVA: awtk.Draggable类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-JAVA
   </div>
   <div id="projectbrief">AWTK JAVA API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>awtk</b></li><li class="navelem"><a class="el" href="classawtk_1_1_draggable.html">Draggable</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="classawtk_1_1_draggable-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">awtk.Draggable类 参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
类 awtk.Draggable 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classawtk_1_1_draggable.png" usemap="#awtk.Draggable_map" alt=""/>
  <map id="awtk.Draggable_map" name="awtk.Draggable_map">
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a2c09ba10507c964430181b802461b84c"><td class="memItemLeft" align="right" valign="top"><a id="a2c09ba10507c964430181b802461b84c"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Draggable</b> (long nativeObj)</td></tr>
<tr class="separator:a2c09ba10507c964430181b802461b84c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac3acb48f9e99c6b6f320da08327daf3b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_draggable.html#ac3acb48f9e99c6b6f320da08327daf3b">setTop</a> (int top)</td></tr>
<tr class="separator:ac3acb48f9e99c6b6f320da08327daf3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f2106e5e7403dbf4aa818bbc4e91236"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_draggable.html#a6f2106e5e7403dbf4aa818bbc4e91236">setBottom</a> (int bottom)</td></tr>
<tr class="separator:a6f2106e5e7403dbf4aa818bbc4e91236"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5dd6f6e9dcb5eccdbc345fd707d38d45"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_draggable.html#a5dd6f6e9dcb5eccdbc345fd707d38d45">setLeft</a> (int left)</td></tr>
<tr class="separator:a5dd6f6e9dcb5eccdbc345fd707d38d45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa4532c1468bcbc3fda66f60dca14795"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_draggable.html#aaa4532c1468bcbc3fda66f60dca14795">setRight</a> (int right)</td></tr>
<tr class="separator:aaa4532c1468bcbc3fda66f60dca14795"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44ad60d716bd921005c366eb0914cfac"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_draggable.html#a44ad60d716bd921005c366eb0914cfac">setVerticalOnly</a> (boolean vertical_only)</td></tr>
<tr class="separator:a44ad60d716bd921005c366eb0914cfac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f012396dff7a493c39d6ad11e6b3381"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_draggable.html#a9f012396dff7a493c39d6ad11e6b3381">setHorizontalOnly</a> (boolean horizontal_only)</td></tr>
<tr class="separator:a9f012396dff7a493c39d6ad11e6b3381"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58ef1d0d5da81dcd236204a21038b71f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_draggable.html#a58ef1d0d5da81dcd236204a21038b71f">setDragWindow</a> (boolean drag_window)</td></tr>
<tr class="separator:a58ef1d0d5da81dcd236204a21038b71f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c1ba1e6650abbb1997d285313ed1075"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_draggable.html#a7c1ba1e6650abbb1997d285313ed1075">getTop</a> ()</td></tr>
<tr class="separator:a7c1ba1e6650abbb1997d285313ed1075"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a384a2aa79f30b45acb6f1ff59d1aab04"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_draggable.html#a384a2aa79f30b45acb6f1ff59d1aab04">getBottom</a> ()</td></tr>
<tr class="separator:a384a2aa79f30b45acb6f1ff59d1aab04"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf039fc90c13e37f446f9248d0404e7a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_draggable.html#abf039fc90c13e37f446f9248d0404e7a">getLeft</a> ()</td></tr>
<tr class="separator:abf039fc90c13e37f446f9248d0404e7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac267f17ee3ae9ff1f8084ea67118c38b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_draggable.html#ac267f17ee3ae9ff1f8084ea67118c38b">getRight</a> ()</td></tr>
<tr class="separator:ac267f17ee3ae9ff1f8084ea67118c38b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7433a7342f21933902e01c5e3f84e274"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_draggable.html#a7433a7342f21933902e01c5e3f84e274">getVerticalOnly</a> ()</td></tr>
<tr class="separator:a7433a7342f21933902e01c5e3f84e274"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aebb5b52929c2d8a7fe373585df45f35f"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_draggable.html#aebb5b52929c2d8a7fe373585df45f35f">getHorizontalOnly</a> ()</td></tr>
<tr class="separator:aebb5b52929c2d8a7fe373585df45f35f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa24d64023604b0714a40e9b80ec8a705"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_draggable.html#aa24d64023604b0714a40e9b80ec8a705">getDragWindow</a> ()</td></tr>
<tr class="separator:aa24d64023604b0714a40e9b80ec8a705"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:aba75cc4acf53cd3de056f8889a2ff6f8"><td class="memItemLeft" align="right" valign="top"><a id="aba75cc4acf53cd3de056f8889a2ff6f8"></a>
static <a class="el" href="classawtk_1_1_draggable.html">Draggable</a>&#160;</td><td class="memItemRight" valign="bottom"><b>cast</b> (long nativeObj)</td></tr>
<tr class="separator:aba75cc4acf53cd3de056f8889a2ff6f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4af212f95980cc532cea71733ee2e425"><td class="memItemLeft" align="right" valign="top">static Widget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_draggable.html#a4af212f95980cc532cea71733ee2e425">create</a> (Widget parent, int x, int y, int w, int h)</td></tr>
<tr class="separator:a4af212f95980cc532cea71733ee2e425"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59952cb48f27a7aa566cc331c10b9ba3"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classawtk_1_1_draggable.html">Draggable</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_draggable.html#a59952cb48f27a7aa566cc331c10b9ba3">cast</a> (Widget widget)</td></tr>
<tr class="separator:a59952cb48f27a7aa566cc331c10b9ba3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:a4dfe3c57a34321f52515628446f8488f"><td class="memItemLeft" align="right" valign="top"><a id="a4dfe3c57a34321f52515628446f8488f"></a>
long&#160;</td><td class="memItemRight" valign="bottom"><b>nativeObj</b></td></tr>
<tr class="separator:a4dfe3c57a34321f52515628446f8488f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>将draggable放入目标控件，即可让目标控件或当前窗口可以被拖动。</p>
<p>draggable_t是widget的子类控件，widget_t的函数均适用于draggable_t控件。</p>
<p>在xml中使用"draggable"标签创建draggable控件。如：</p>
<div class="fragment"><div class="line">&lt;<span class="keywordtype">button</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;Drag Me&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;80&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;40&quot;</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;10&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;10&quot;</span>&gt;</div><div class="line">&lt;<span class="keywordtype">draggable</span> /&gt;</div><div class="line">&lt;/<span class="keywordtype">button</span>&gt;</div></div><!-- fragment --><p>拖动对话框标题时移动对话框：</p>
<div class="fragment"><div class="line">&lt;<span class="keywordtype">dialog_title</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;0&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;0&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;100%&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;30&quot;</span> <span class="keyword">text</span>=<span class="stringliteral">&quot;Hello AWTK&quot;</span></div><div class="line">&lt;<span class="keywordtype">draggable</span> <span class="keyword">drag_window</span>=<span class="stringliteral">&quot;true&quot;</span>/&gt;</div><div class="line">&lt;/<span class="keywordtype">dialog_title</span>&gt;</div></div><!-- fragment --><p>更多用法请参考： <a href="https://github.com/zlgopen/awtk/blob/master/demos/assets/default/raw/ui/draggable.xml">draggable.xml</a></p>
<p>在c代码中使用函数draggable_create创建按钮控件。如：</p>
<p>draggable本身不可见，故无需style。 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a59952cb48f27a7aa566cc331c10b9ba3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59952cb48f27a7aa566cc331c10b9ba3">&#9670;&nbsp;</a></span>cast()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classawtk_1_1_draggable.html">Draggable</a> awtk.Draggable.cast </td>
          <td>(</td>
          <td class="paramtype">Widget&#160;</td>
          <td class="paramname"><em>widget</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>转换为draggable对象(供脚本语言使用)。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">widget</td><td>draggable对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>draggable对象。 </dd></dl>

</div>
</div>
<a id="a4af212f95980cc532cea71733ee2e425"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4af212f95980cc532cea71733ee2e425">&#9670;&nbsp;</a></span>create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static Widget awtk.Draggable.create </td>
          <td>(</td>
          <td class="paramtype">Widget&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建draggable对象</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>父控件 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标 </td></tr>
    <tr><td class="paramname">w</td><td>宽度 </td></tr>
    <tr><td class="paramname">h</td><td>高度</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对象。 </dd></dl>

</div>
</div>
<a id="a384a2aa79f30b45acb6f1ff59d1aab04"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a384a2aa79f30b45acb6f1ff59d1aab04">&#9670;&nbsp;</a></span>getBottom()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.Draggable.getBottom </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>拖动范围的底部限制。缺省为父控件的底部。 </p>

</div>
</div>
<a id="aa24d64023604b0714a40e9b80ec8a705"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa24d64023604b0714a40e9b80ec8a705">&#9670;&nbsp;</a></span>getDragWindow()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">boolean awtk.Draggable.getDragWindow </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>拖动窗口而不是父控件。比如放在对话框的titlebar上，拖动titlebar其实是希望拖动对话框。 </p>

</div>
</div>
<a id="aebb5b52929c2d8a7fe373585df45f35f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aebb5b52929c2d8a7fe373585df45f35f">&#9670;&nbsp;</a></span>getHorizontalOnly()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">boolean awtk.Draggable.getHorizontalOnly </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>只允许水平拖动。 </p>

</div>
</div>
<a id="abf039fc90c13e37f446f9248d0404e7a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf039fc90c13e37f446f9248d0404e7a">&#9670;&nbsp;</a></span>getLeft()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.Draggable.getLeft </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>拖动范围的左边限制。缺省为父控件的左边。 </p>

</div>
</div>
<a id="ac267f17ee3ae9ff1f8084ea67118c38b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac267f17ee3ae9ff1f8084ea67118c38b">&#9670;&nbsp;</a></span>getRight()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.Draggable.getRight </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>拖动范围的右边限制。缺省为父控件的右边边。 </p>

</div>
</div>
<a id="a7c1ba1e6650abbb1997d285313ed1075"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7c1ba1e6650abbb1997d285313ed1075">&#9670;&nbsp;</a></span>getTop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.Draggable.getTop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>拖动范围的顶部限制。缺省为父控件的顶部。 </p>

</div>
</div>
<a id="a7433a7342f21933902e01c5e3f84e274"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7433a7342f21933902e01c5e3f84e274">&#9670;&nbsp;</a></span>getVerticalOnly()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">boolean awtk.Draggable.getVerticalOnly </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>只允许垂直拖动。 </p>

</div>
</div>
<a id="a6f2106e5e7403dbf4aa818bbc4e91236"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6f2106e5e7403dbf4aa818bbc4e91236">&#9670;&nbsp;</a></span>setBottom()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Draggable.setBottom </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>bottom</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置bottom。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">bottom</td><td>拖动范围的底部限制。缺省为父控件的底部。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a58ef1d0d5da81dcd236204a21038b71f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a58ef1d0d5da81dcd236204a21038b71f">&#9670;&nbsp;</a></span>setDragWindow()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Draggable.setDragWindow </td>
          <td>(</td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>drag_window</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置drag_window。 拖动窗口而不是父控件。比如放在对话框的titlebar上，拖动titlebar其实是希望拖动对话框。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">drag_window</td><td>drag_window</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a9f012396dff7a493c39d6ad11e6b3381"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9f012396dff7a493c39d6ad11e6b3381">&#9670;&nbsp;</a></span>setHorizontalOnly()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Draggable.setHorizontalOnly </td>
          <td>(</td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>horizontal_only</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置horizontal_only。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">horizontal_only</td><td>只允许水平拖动。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a5dd6f6e9dcb5eccdbc345fd707d38d45"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5dd6f6e9dcb5eccdbc345fd707d38d45">&#9670;&nbsp;</a></span>setLeft()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Draggable.setLeft </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>left</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置left。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">left</td><td>拖动范围的左边限制。缺省为父控件的左边。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="aaa4532c1468bcbc3fda66f60dca14795"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaa4532c1468bcbc3fda66f60dca14795">&#9670;&nbsp;</a></span>setRight()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Draggable.setRight </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>right</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置right。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">right</td><td>拖动范围的右边限制。缺省为父控件的右边边。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ac3acb48f9e99c6b6f320da08327daf3b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac3acb48f9e99c6b6f320da08327daf3b">&#9670;&nbsp;</a></span>setTop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Draggable.setTop </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>top</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置top。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">top</td><td>拖动范围的顶部限制。缺省为父控件的顶部。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a44ad60d716bd921005c366eb0914cfac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44ad60d716bd921005c366eb0914cfac">&#9670;&nbsp;</a></span>setVerticalOnly()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Draggable.setVerticalOnly </td>
          <td>(</td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>vertical_only</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置vertical_only。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">vertical_only</td><td>只允许垂直拖动。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/Draggable.java</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
